The sands of America’s 12,000-mile coastline tell stories of glaciers, volcanoes, rivers, and seas—each grain a fragment of the nation’s past.